package com.example.demo.identity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;

import java.util.List;

@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class PullGroupInfo {

    private String group_id;

    private String group_key;

    private String group_name;

    private String group_type;

    private String group_leader;

    private String groupAvatar;

    private List<MembersInfo> group_members;


    @Override
    public String toString() {
        return "PullGroupInfo{" +
                "groupId='" + group_id + '\'' +
                ", groupName='" + group_name + '\'' +
                ", groupType='" + group_type + '\'' +
                ", groupLeader='" + group_leader + '\'' +
                ", groupAvatar='" + groupAvatar + '\'' +
                ", groupMembers=" + group_members +
                '}';
    }

    @Setter
    @Getter
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class MembersInfo {

        @JsonProperty("key")
        private String key;

        @JsonProperty("label")
        private String label;

        @JsonProperty("avatar")
        private String avatar;

        @Override
        public String toString() {
            return "MembersInfo{" +
                    "key='" + key + '\'' +
                    ", label='" + label + '\'' +
                    ", avatar='" + avatar + '\'' +
                    '}';
        }
    }
}